package modelLayer;
import java.util.ArrayList;

/**
 * Denne class omhandler Personer, og har deres navn, adresse, post nummer, by og telefon nr.
 * Disse variabler kan ændres
 *  
 * 
 */
public class Person
{
    private String name;
    private String address;
    private String postalCode;
    private String city;
    private String phone;
    private ArrayList<Loan> loans;
    
    /**
     * Constructor for objects of class Person
     */
    public Person(String name, String address, String postalCode, String city, String phone)
    {
        this.name = name;
        this.address = address;
        this.postalCode = postalCode;
        this.city = city;
        this.phone = phone;
        this.loans = new ArrayList<Loan>();
    }
    public Person()
    {
        name = "Emil";
        address = "Langagervej 4";
        postalCode = "9220";
        city = "Aalborg Øst";
        phone = "28106729";
    }
    public void printInformation(){
        System.out.println("Name is: " + name);
        System.out.println("Address is: " + address);
        System.out.println("Postal code is: " + postalCode);
        System.out.println("City: " + city);
        System.out.println("Phonenumber is: " + phone);
    }
        public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public String getPostalCode() {
        return postalCode;
    }
    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }    
    
    public void addLoan(Loan loan)
    {
        loans.add(loan);
    }
    
    public void removeLoan(Loan loan)
    {
        loans.remove(loan);
    }
    
    
}
